package com.code.day17JiHe.Stream;

import java.util.function.Function;

public class Test07ShuZU {
    public static void main(String[] args) {
        method(new Function<Integer, int[]>() {
            @Override
            public int[] apply(Integer integer) {
                return new int[integer];
            }
        }, 5);
        System.out.println("===================");


        method( integer-> new int[integer], 5);
        method( int[]::new, 5);
    }

    public static void method(Function<Integer, int[]> function, Integer ing){
        int[] arr =function.apply(ing);
        System.out.println(arr.length);
    }
}
